import React from 'react'
import {Routes,Route} from 'react-router-dom'
import Login from './views/Login'
import Register from './views/Register'
import Home from './views/Home'
import ProductList from './views/product/ProductList'
import CategoryList from './views/product/CategoryList'
import UserList from './views/users/UserList'
import RoleList from './views/role/RoleList'
import Main from './views/Main'
import NotFound from './views/NotFound'
export default function App() {
  return (
    <div>
      <Routes>
         <Route path='/login' element={<Login></Login>}></Route>
         <Route path='/register' element={<Register></Register>}></Route>
         <Route path='/' element={<Home></Home>}>
            <Route index element={<Main></Main>}></Route>
            <Route path='/home/product/list' element={<ProductList></ProductList>}></Route>
            <Route path='/home/product/category' element={<CategoryList></CategoryList>}></Route>
            <Route path='/home/user' element={<UserList></UserList>}></Route>
            <Route path='/home/role' element={<RoleList></RoleList>}></Route>
         </Route>
         <Route path='*' element={<NotFound></NotFound>}></Route>
      </Routes>
    </div>
  )
}
